package com.goldsign.pay.provider.msg.rabbit.consumer;

import java.util.Date;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
/** 消费多个队列 */
@RabbitListener(queues={"dev.topic.A","dev.topic.B"})
public class RbtConsumer2 {
	/**支持对象发送和接收*/
	@RabbitHandler
	public void process(String content){
		System.out.printf("<== Receiver msg : %s By %s, %s [process method: %s] %n",content,this.getClass().getSimpleName(), new Date().getTime(),Thread.currentThread().getStackTrace()[1].getMethodName());
	}
}
